﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="TR_ScholarFinance.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.TR_ScholarFinance" %>

<%@ Register src="../Controls/user.ascx" tagname="user" tagprefix="uc1" %>

<asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1">  

  <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />
        
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">        
            <script type="text/javascript">
                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }            
                function openDetails(train_seq)
                {
                   radopen("TR_TrainingCoursesDtls.aspx?Sequence=" + train_seq,"RadWindow1");
                }
            </script>    
    </telerik:RadCodeBlock>
      
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" 
                        LoadingPanelID="RadAjaxLoadingPanel2" /> 
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>    
    
      <asp:panel ID="Panel6" runat="server" >
    <table width="1000" cellpadding="0" cellspacing="0">
        <tr>
            <td valign = "top">
                
                <!-- <uc1:user ID="user1" runat="server" /> -->
                
            </td>
            <td width="20" >
            </td>
            <td>
            <div class="moduleDivSlim700">
                    <div class="moduleDivBottom700">
                         <asp:Panel ID="PanelFilter" runat="server" Width="700px" ScrollBars="Auto">
                            <table align = "center" width = "650px">
                                    <tr>
                                        <td align="right" >
                                            &nbsp;</td>
                                        <td>
                                            &nbsp;</td>
                                        
                                       <td>
                                            &nbsp;</td>
                                    </tr>
                                </table>
                        </asp:Panel>
                    </div>
                </div>
            </td>
          </tr>
          <tr>
          <td colspan = "3">
        <div class="moduleDivSlim1000">
        <div class="moduleDivBottom1000">
        <table align="center" width ="980px" >
        <tr>
            <td align="left" class="tableHeader">
                รายชื่อผู้ได้รับทุนการศึกษาตามรายการทุน </td>
        </tr>
        </table>
        <table width ="980px" align="center">
        <tr>
        <td align="left">
        <asp:Panel ID="PanelGrid" 
            runat="server" 
            Width="980px" 
            Height="340px" ScrollBars="Auto" >
                <telerik:RadGrid ID="RadGrid2" runat="server" AllowFilteringByColumn="True" AllowAutomaticDeletes="True"
                    AllowMultiRowEdit="True" AllowMultiRowSelection="True" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" EnableAJAX="True" 
                    EnableAJAXLoadingTemplate="True" GridLines="None" 
                    OnItemCommand="RadGrid2_ItemCommand" Skin="Outlook" Width="99%" 
                    onitemdatabound="RadGrid2_ItemDataBound">
                    <MasterTableView 
                        AllowMultiColumnSorting="True" 
                        CellSpacing="-1" 
                        GroupsDefaultExpanded="true"
                        GroupLoadMode="Client"
                        ClientDataKeyNames="trainee_seq" 
                        CommandItemDisplay="Top" 
                        DataKeyNames="trainee_seq" 
                        NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                        <CommandItemTemplate>
                            <table width="100%">
                                <tr align="left">
                                    <td>
                                       &nbsp;
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldName="train_seq" />
                                </GroupByFields>
                                <SelectFields>
                                    <telerik:GridGroupByField FieldName="training_course_descr" HeaderText="ทุนการศึกษา"  />
                                </SelectFields>                                
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                        <Columns>                                 
                            <telerik:GridBoundColumn 
                                DataField="train_seq" 
                                UniqueName="train_seq" 
                                Visible="false">
                            </telerik:GridBoundColumn>
                                                        
                            <telerik:GridTemplateColumn 
                               AutoPostBackOnFilter="true" 
                                CurrentFilterFunction="Contains" 
                                DataField="FULL_NAME" 
                                HeaderText="ชื่อ-สกุล" 
                                FilterControlWidth="100%"                                                     
                                ShowFilterIcon="false" 
                                UniqueName="FULL_NAME">        
                                <ItemTemplate>              
                                    <asp:LinkButton ID="cmDetail" runat="server" 
                                        Text='<%# Eval("FULL_NAME") %>' 
                                        
                                        OnClientClick='<%# string.Format("return openDetails(\"{0}\");", Eval("train_seq")) %>'>
                                    </asp:LinkButton>
                                </ItemTemplate>  
                                <ItemStyle HorizontalAlign="Left" />             
                            </telerik:GridTemplateColumn> 
                            
                            <telerik:GridBoundColumn DataField="working_text" HeaderText="สังกัด" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="JobSite">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                               <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                               
                            <telerik:GridBoundColumn DataField="position_text" HeaderText="ตำแหน่ง" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="Position">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                               <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridBoundColumn DataField="class_text" HeaderText="ระดับ" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="Lavel">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" Width="150px" />
                               <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridBoundColumn DataField="" HeaderText="สถาบัน" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="" 
                               Visible="false">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                               <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                             <telerik:GridBoundColumn 
                                DataField="date_start"
                                HeaderText="วันที่เริ่ม"
                                AutoPostBackOnFilter="true" 
                                CurrentFilterFunction="Contains"  
                                FilterControlWidth="100%" 
                                ShowFilterIcon="false" 
                                DataFormatString="{0:d}" 
                                UniqueName="date_start">
                                <HeaderStyle HorizontalAlign="Center" Width="80px" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                        </Columns>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    </MasterTableView>
                    <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" 
                        EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                    </ClientSettings>
                </telerik:RadGrid>
            </asp:Panel>
        </td>
        </tr>
        </table>
    </div>
</div>
</td>
</tr>
</table>
</asp:panel>

    <telerik:RadWindowManager ID="RadWindowManager1" VisibleStatusbar="false" ReloadOnShow="true"
        runat="server" Skin="Vista">
        <Windows>
        <telerik:RadWindow 
            id="RadWindow1" 
            runat="server"        
            showcontentduringload="false"
            VisibleStatusbar="false"
            AutoSize = "true"
            title="รายละเอียดการอบรม"      
            Modal="true"
            behaviors="Close">
        </telerik:RadWindow>
    </Windows>        
    </telerik:RadWindowManager> 

</asp:Content>
